﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
                    mc:Ignorable="d">
    <!-- Resource dictionary entries should be defined here. -->
    <DataTemplate x:Key="PersonsDataTemplate">
        <Grid Width="319"
              Height="107">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="113" />
                <ColumnDefinition Width="206" />
            </Grid.ColumnDefinitions>
            <toolkit:ContextMenuService.ContextMenu>
                <toolkit:ContextMenu>
                    <toolkit:MenuItem Header="add to favourites"
                                      Command="{Binding MainViewModel.SelectAddToFavouritesCommand, Source={StaticResource Locator}}"
                                      CommandParameter="{Binding .}" />
                </toolkit:ContextMenu>
            </toolkit:ContextMenuService.ContextMenu>
            <StackPanel d:LayoutOverrides="Height"
                        Grid.Column="1">
                <TextBlock Text="{Binding LastName}"
                           Padding="0,0,0,12"
                           FontFamily="{StaticResource PhoneFontFamilyNormal}"
                           FontSize="{StaticResource PhoneFontSizeMediumLarge}" />
                <TextBlock Text="{Binding FirstName}"
                           FontFamily="{StaticResource PhoneFontFamilySemiBold}"
                           FontSize="{StaticResource PhoneFontSizeMediumLarge}" />
            </StackPanel>
            <Image Source="{Binding ProfileImage}"
                   Width="100"
                   Height="100"
                   Stretch="UniformToFill" />
        </Grid>
    </DataTemplate>
</ResourceDictionary>